home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-12-03 | 1.1 KB | 48 lines | [TEXT/MPS ] |
- c This collection of subroutines is called by the Pascal
- c program PcallsF.
- c
- c Example provided for owners of Language Systems FORTRAN
- c © 1990 Language Systems Corp.
- c
-
- SUBROUTINE Charfill (cc) !Expect arguments by descriptor
-
- CHARACTER*20 cc !Define the argument
-
- cc = 'Hello World!'
-
- END
-
- SUBROUTINE Charfill2(cc) !Expects argument by reference
-
- STRUCTURE /C/
- CHARACTER*20 ch !Define the argument
- END STRUCTURE
-
- RECORD /C/ cc
- cc.ch = 'This is a switch!'
-
- END
-
- SUBROUTINE SumArray(iary,%val(n),total)
- ! Expects first argument by reference, second by value
- integer*2 iary(100),total,index, n !Define the arguments and work counter
-
- total = 0 !Clear the total
-
- do index = 1,n !Step through the array
- total = total + iary(index) !Add them up
- end do
-
- end !And exit
-
- SUBROUTINE SumArray2
- integer*2 iary2(100),total2,index,n2 !Define arguments and work counter
- COMMON /TEST/ iary2,total2,n2
- total2 = 0 !Clear the total
-
- do index = 1,n2 !Step through the array
- total2 = total2+iary2(index) !Add them up
- enddo
-
- end !And exit